#include <stdio.h>

int main() {
    char ch;
    
    while (1) { 
        printf("请输入一个字符: ");
        ch = getchar(); 
        printf("您输入的字符: ");
        putchar(ch);
        printf("\n");
        int c;
        while ((c = getchar()) != '\n' && c != EOF);
        if (ch == 'q') {
            printf("程序结束\n");
            break;
        }
    }
    
    return 0;
}
